{%extends "frontend/base.html"%}
{% load static %}
{%block content%}



    <div class="panel panel-default">
  <div class="panel-body">
      <div  class="search-item"><span>标题：<input name="title" type="text" value="" id="id_title"/></span> <span style="float: left;">作者：<input name="author" value="" type="text" id="id_author" /> </span><span><a href="#" class="btn btn-xs btn-info" onclick="dosearch();">搜索</a></span></div>
    <div class="search-item"><span style="float: left;">行业：</span><ul>{%for trade in trades%}<li><a href="/search/reports/?trade={{trade.code}}" class="btn btn-xs btn-info">{{trade.name}}</a></li>{%endfor%}</ul></div>
      <div class="search-item"><span style="float: left;">频率：</span><ul>{%for frequency in frequencys%}<li><a href="/search/reports/?frequency={{frequency.code}}" class="btn btn-xs btn-info">{{frequency.name}}</a></li>{%endfor%}</ul></div>
      <div class="search-item"><span style="float: left;">机构：</span><ul>{%for institution in institutions%}<li ng-repeat="institution in metadata.institutions"><a  href="/search/reports/?institution={{institution.code}}" class="btn btn-xs btn-info">{{institution.name}}</a></li>{%endfor%}</ul></div>


  </div>
    </div>

<div class="content">


<div class="report-left-box">
  {%for trade in trades%}

  <div class="panel panel-default report-list-box" >
  <div class="panel-heading">{{trade.name}}<span style="float:right"><a href="/trade/{{trade.code}}/">更多</a></span></div>
  <div class="panel-body">
    <ul>
      {%for item in trade.latest_8_reports%}
    <li><a href="/report/{{item.pk}}/detail/">{{item.name}}</a></li>
      {%endfor%}

    </ul>
  </div>
</div>
  {%endfor%}
</div>
  <div class="report-right-box">

    <div class="panel panel-default">
  <div class="panel-body">
    {%for item in products%}
    <a href="/products/{{item.code}}/">{{item.product}}</a>
    {%endfor%}
  </div>
</div>


     <div class="panel panel-default report-list-box" >
  <div class="panel-heading">热门</div>
  <div class="panel-body">
    <ul>
      {%for item in hots%}
      <li><a href="/report/{{item.pk}}/detail/">{{item.name}}</a></li>
      {%endfor%}

    </ul>
  </div>
</div>


  </div>

</div>

{%endblock%}
{%block bottomjs%}
  <script language="javascript" type="text/javascript">
    function dosearch() {
      window.location.href="/search/reports/?title="+$("#id_title").val()+"&author="+$("#id_author").val();
    }

  </script>
{%endblock%}
